let aLi = document.querySelectorAll(".header li");
aLi.forEach((i) => {
  i.onmouseover = function () {
    i.style.backgroundColor = "#f65b52";
    i.style.color = "#fff";
  };
  i.onmouseout = function () {
    i.style.backgroundColor = "transparent";
    i.style.color = "#000";
  };
});
let case_li = document.querySelectorAll(".case li");
let oDiv = document.querySelector("#subscript");
for (let i = 0; i < case_li.length; i++) {
  case_li[i].onmouseover = function () {
    case_li[i].style.backgroundColor = "#f65b25";
    oDiv.style.left = 405 + i * 200 + "px";
    oDiv.style.borderTopColor = "#f65b25";
    // console.log("进入第" + i + "个li");
  };
  case_li[i].onmouseout = function () {
    case_li[i].style.backgroundColor = "#666";
    oDiv.style.left = 405 + "px";
    oDiv.style.borderTopColor = "transparent";
    // console.log("离开第" + i + "个li");
  };
}
let aSpan = document.querySelectorAll(".main span");
for (let i = 0; i < aSpan.length; i++) {
  aSpan[i].style.top = 157 + "px";
  aSpan[i].style.left = 255 + i * 400 + "px";
  aSpan[i].style.backgroundPositionY = -162 * i + "px";
}
